package com.hejing.抽象类与抽象方法;

/**
 * ClassName: Student
 * Package: com.hejing.抽象类与抽象方法
 * Description:
 *
 * @Author: HeJing
 * @Create: 2023-03-29 10:26
 * @Version: 1.0
 */
public class Student extends Person{
    String school;

    public Student() {

    }

    public Student(String name, int age, String school) {
        super(name, age);
        this.school = school;
    }

    // 方法重写
    @Override
    public void eat() {
        System.out.println("学生应该多吃肉");
    }

    @Override
    public void sleep() {
        System.out.println("学生应该多睡觉");
    }


}
























